using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace LeisureCenter.Controls
{
    public class ArrowPanel : Control
    {
        private bool up;

	    public bool Up
	    {
		    get { return up;}
		    set 
            {
                up = value;
                Invalidate();
            }
	    }

        public ArrowPanel()
        {
            BackColor = SystemColors.Window;
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            Font font = new Font("Marlett", 16);

            string ch;
            if (up)
                ch = "t";
            else
                ch = "u";

            Brush brush;
            if (Enabled)
                brush = SystemBrushes.ControlDarkDark;
            else
                brush = SystemBrushes.Control;

            SizeF size = e.Graphics.MeasureString(ch, font);
            e.Graphics.DrawString(ch, font, brush, new Point((Width - (int)size.Width) / 2, (Height - (int)size.Height) / 2));
        }
    }
}
